{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading"> {$title}</header>
                <div class="btn-toolbar" style="margin:5px 0 5px 10px">
                    <a type="button" class="btn btn-primary" href="{:url('one')}">新 增</a>
                </div>
                {include file="web/public/search" /}
                {notempty name="_list"}
                <div class="table-responsive">
                    <table class="table table-striped table-hover b-t b-light text-sm">
                        <thead>
                        <tr>
                            <th width="80px">ID号</th>
                            <th>开始时间</th>
                            <th>结束时间</th>
                            <th>期数</th>
                            <th>总量</th>
                            <th>已匹配</th>
                            <th>已发放</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='_list' id='vo'}
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.start_time}</td>
                            <td>{$vo.end_time}</td>
                            <td>{$vo.period}</td>
                            <td>{$vo.total_num}</td>
                            <td>{$vo.has_num}</td>
                            <td>{$vo.bonus_num}</td>
                            <td>
                                <a title="编辑" href="{:url('one?id='.$vo['id'])}" class="btn btn-success">编辑</a>
                                <a title="发放奖励" href="{:url('ActivityMembers/lists?id='.$vo['id'])}" class="btn btn-info">发放奖励</a>
                                <a class="btn btn-warning" title="删除" onclick="del({$vo['id']});return false;">删除</a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                {else/}
                <div style="text-align: center">
                    <image src="__PUBLIC__/images/empty.jpg"></image>
                </div>
                {/notempty}
            </section>
        </div>
    </div>
</section>
{/block}
{block name="script"}
<script type="text/javascript">

    function del(id) {
        $.post('/admin/Activities/del', {id: id}, function (data) {
            Onsuccess(data);
        }, 'json')
    }

</script>
{/block}

